home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / dev / basic / SOpt.lha / InstallSuperOptimizer < prev    next >
Text File  |  1997-09-03  |  4KB  |  165 lines

  1. ; $VER: InstallSuperOptimizer 2.28 (03.09.97)
  2. ;
  3. ; Installer script for the SuperOptimizer
  4. ; ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  5. ; The script has been written by Daniel Seifert in 1997
  6. ; SuperOptimizer is copyrighted © by Manuel Andre in 1995-1997
  7. ;
  8. ;
  9. ;--------------------------------------------------------
  10. ; Var declarations
  11. ;--------------------------------------------------------
  12.  
  13. (set #ACEnotinstalled
  14.       (cat "SuperOptimizer can not be installed if you do not have "
  15.            "ACE installed correctly. Please refer to the "
  16.            "ACE documentation on how to install it."
  17.            "\n\n ------ \n\n"
  18.            "ACE - AmigaBASIC Compiler with Extras\n"
  19.            "Copyright © by David Benn 1991-1997\n\n"
  20.            "Available on AmiNet in dev/basic."
  21.       )
  22. )
  23.  
  24. (set #SODrawerPrompt
  25.       (cat "Please choose a directory where I shall copy "
  26.            "the new SuperOptimizer version to!"
  27.       )
  28. )
  29.  
  30. (set #SODrawerHelp
  31.       (cat "Here you have the choice to specify where "
  32.            "the SuperOptimizer should be copied to. Please choose a "
  33.            "directory (default: ACE:BIN/). \n\n"
  34.            "No sub-directory is created!"
  35.       )
  36. )
  37.  
  38.  
  39. (set #InstallBin
  40.       (cat "Installerscript\n"
  41.            "for\n"
  42.            "SuperOptimizer version 2.28"
  43.       )
  44. )
  45.  
  46.  
  47. (set #ReallyInstallDoc
  48.       (cat "SuperOptimizer manual\n\n"
  49.            "This package comes with a (nice) AmigaGuide "
  50.            "manual for the SuperOptimizer.\n"
  51.            "Do you wish to install the manual, too?"
  52.       )
  53. )
  54.  
  55. (set #ReallyInstallDocHelp
  56.       (cat "If you think you are able to understand "
  57.            "every feature of the SuperOptimizer instantly it is not "
  58.            "necessary to install the manual.\n"
  59.            "But think twice: it's always better to "
  60.            "have a copy somewhere if you wish to "
  61.            "look something up!"
  62.       )
  63. )
  64.  
  65. (set #InstallDoc
  66.       (cat "Where shall I copy the manual to?")
  67. )
  68.  
  69. (set #InstallDocHelp
  70.       (cat "Choose a directory I will copy the manual to. "
  71.            "No subdirectory will be created.\n"
  72.            "The default for the directory is ACE:docs "
  73.            "where all the other ACE related manuals should "
  74.            "be as well."
  75.       )
  76. )
  77.  
  78. (set #SODrawer  "ACE:BIN")
  79. (set #DocsDrawer  "ACE:docs")
  80.  
  81. ;--------------------------------------------------------
  82. ; Procedures
  83. ;--------------------------------------------------------
  84.  
  85. (procedure P_InstallDoc
  86.  (
  87.   (copyfiles (SOURCE "docs/SuperOptimizer.guide") (DEST #DocsDrawer) (infos))
  88.  )
  89. )
  90.  
  91. ;--------------------------------------------------------
  92. ; Main
  93. ;--------------------------------------------------------
  94.  
  95.  
  96. ; If ACE is not installed we have to abort ;-(
  97. (IF (= (GETASSIGN "ace") "")
  98.   (
  99.    (message #ACEnotinstalled)
  100.    (exit (quiet))
  101.   )
  102. )
  103.  
  104.  
  105. ;---------------------------------------------------------------------
  106. ; now do really start (install automatically or ask for confirmation)
  107. ;---------------------------------------------------------------------
  108.  
  109. ; install binary (set destination drawer)
  110. (IF (> @user-level 0)
  111.  (
  112.   (MESSAGE #InstallBin)
  113.   (SET #SODrawer
  114.          (ASKDIR (PROMPT  #SODrawerPrompt)
  115.                  (DEFAULT #SODrawer)
  116.                  (HELP    #SODrawerHelp)
  117.          )
  118.   )
  119.  )
  120. )
  121.  
  122. ; install binary (copy files)
  123. (set @default-dest #SODrawer)
  124. (copyfiles (SOURCE "bin/SuperOptimizer") (DEST #SODrawer) (infos) )
  125.  
  126. ; install documentation
  127. (IF (> @user-level 0)
  128.  (
  129.   (IF (ASKBOOL (prompt  #ReallyInstallDoc)
  130.                (help    #ReallyInstallDocHelp)
  131.                (default 1)
  132.                (choices "Yes" "No")
  133.       )
  134.    (
  135.     (SET #DocsDrawer
  136.          (ASKDIR (PROMPT  #InstallDoc)
  137.                  (DEFAULT #DocsDrawer)
  138.                  (HELP    #InstallDocHelp)
  139.          )
  140.     )
  141.     (P_InstallDoc)
  142.    )
  143.   )
  144.  )
  145.  (
  146.   (P_InstallDoc)
  147.  )
  148. )
  149.  
  150. ;
  151. (set #ExitText
  152.       (cat "Installing the SuperOptimizer completed.\n\n"
  153.            "It can be found in "
  154.            #SODrawer
  155.            "\n"
  156.            "The manual can be found in "
  157.            #DocsDrawer
  158.            "\n\n --- \n\n"
  159.            "Happy ACEing ;-)"
  160.       )
  161. )
  162.  
  163. ; and done
  164. (exit (#ExitText) (quiet))
  165.